package com.xuetang9.t9.xinhuaxia.service.impl;

import com.xuetang9.t9.xinhuaxia.beans.SocialPicture;
import com.xuetang9.t9.xinhuaxia.beans.SocialPublish;
import com.xuetang9.t9.xinhuaxia.mappers.SocialPictureMapper;
import com.xuetang9.t9.xinhuaxia.mappers.SocialPublishMapper;
import com.xuetang9.t9.xinhuaxia.service.ISocialPictureService;
import com.xuetang9.t9.xinhuaxia.service.ISocialPublishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 陈焱
 * @version 1.0
 * @desc
 * @time 2020/2/26 下午 5:26
 * @copyright liyq
 * @address 成都西部国际金融中心2栋2201
 **/
@Service
public class SocialPictureService implements ISocialPictureService {

    @Autowired
    private SocialPictureMapper socialPictureMapper;


    @Override
    public boolean add(SocialPicture socialPicture) {
        return socialPictureMapper.insert(socialPicture)>0;
    }

    @Override
    public List<SocialPicture> queyByPublishId(int id) {
        return socialPictureMapper.queyByPublishId(id);
    }

    @Override
    public List<SocialPicture> queryByUserId(int id) {
        return socialPictureMapper.queryByUserId(id);
    }
}
